<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>{% block title %}{{ application_name }}{% endblock %}</title>
    <link href="/static/css/base.css" rel="stylesheet" type="text/css"/>
    <link href="/static/css/chrome.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript">

    function NewPage() {
      var pageName = window.prompt("Enter the WikiName of your new page:");
      if (pageName) {
        location.href = pageName + "?mode=edit";
      }
    }

    </script>
    {% block head %}{% endblock %}
  </head>
  <body>
    <div id="header">
      <div class="top">
        <div class="title"><a href="/"><img src="/static/images/logo.png" alt="Crunchy Python Wiki" height="50px"/></a>
</div>
        <div class="login">
          {% if user %}
            <span class="item nickname">{{ user.nickname }}</span> |
            <span class="item"><a href="{{ logout_url|escape }}">Sign out</a></span>
          {% else %}
            <span class="item"><a href="{{ login_url|escape }}">Sign in</a></span>
          {% endif %}
        </div>
      </div>
      <div class="bottom">
        <div class="attribution">
          {% if page.entity %}
            Edited on {{ page.entity.modified|date:"D, M j, Y \a\t P" }} by
            {% if page.user %}
              {{ page.user.nickname }}
            {% else %}
              an anonymous user
            {% endif %}
          {% endif %}
        </div>
        <div class="buttons"><span class="item"><input type="button" value="New Page" onclick="NewPage()"/></span>{% block buttons %}{% endblock %}</div>
        <div style="clear: both"></div>
      </div>
    </div>
    <div id="body">{% block body %}{% endblock %}</div>
    <div id="footer">
        <a href="http://code.google.com/p/googleappengine/">
        <img src="http://code.google.com/appengine/images/appengine-silver-120x30.gif"
alt="Powered by Google App Engine"/></a>
    </div>
  </body>
</html>
